package view;

import java.awt.Dimension;

import game.*;

import javax.swing.*;

/**
 * <p><strong>This comment has been removed due to a total lack of relevance and facts.</strong></p>
 * 
 * @author Nicole Waldrum
 * @date March 9, 2010
 * @version 3.0
 * 
 * @author Trevor Bastian
 * @date March 9, 2010
 * @version 3.0
 * 
 * @author Mark Kelly
 * @date March 30, 2010
 * @version 4.0
 */
public class HelpGUI extends JFrame{
	// Class Variables
	private static final long serialVersionUID = 4894802705475258301L;	
	private static int SCROLL_INCREMENT = 5;
	
	// Instance Variables
	JScrollPane pictureScrollPane;
	ScrollablePicture picture;
	
	/**
	 * <p>Loads the help pages that are required by the gametype that the user has chosen.</p>
	 * 
	 * @param type is the {@code GameType} the user has chosen to play
	 */
	public HelpGUI(GameType type){
		super("Help");
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		
		// setup the pane
		ImageIcon image = new ImageIcon(type.getClass().getSimpleName() + "Help.jpg");
		picture = new ScrollablePicture(image, SCROLL_INCREMENT);
		pictureScrollPane = new JScrollPane(picture);
		
		setPreferredSize(new Dimension(400, 340));
		
		this.setContentPane(pictureScrollPane);
		this.pack();
		this.setVisible(true);
	}
	
}
